import request from "@/utils/request";

// 获取专业树数据
export function getTree(params) {
  return request({
    method: "post",
    url: "/jobInfo/getMajorTree",
    params,
  });
}

// 获取省级城市名称
export function getProvince() {
  return request({
    method: "get",
    url: "/jobInfo/getProvincialLevelCities",
  });
}

// 获取市级城市
export function getCity(id) {
  return request({
    method: "get",
    url: "/jobInfo/getCityLevelCities/" + id,
  });
}

// 获取表格数据
export function getTable(data) {
  return request({
    method: "post",
    url: "/jobInfo/getPageList",
    data,
  });
}

// 删除表格数据
export function deleteTable(id) {
  return request({
    url: "/jobInfo/" + id,
    method: "delete",
  });
}

// 批量删除表格数据
export function deleteTableAll(ids) {
  return request({
    url: "/jobInfo/job/" + ids,
    method: "delete",
  });
}

// 确认新增数据
export function verifyAdd(data) {
  return request({
    method: "post",
    url: "jobInfo/add",
    data,
  });
}

// 编辑回显数据
export function edit(id) {
  return request({
    method: "get",
    url: "/jobInfo/getJobOne/" + id,
  });
}

// 编辑确认按钮
export function verifyEdit(data) {
  return request({
    method: "post",
    url: "/jobInfo/update",
    data,
  });
}
